package com.byq.mm.smartlib.obd.commands.protocol;

import com.byq.mm.smartlib.obd.commands.AbstractObdCommand;

/**
 * * This will set the value of time in milliseconds (ms) that the OBD interface
 * * will wait for a response from the ECU. If exceeds, the response is
 * "NO DATA".
 */
public class TimeoutObdCommand extends AbstractObdCommand {
	/**
	 * * @param a * value between 0 and 255 that multiplied by 4 results in the
	 * * desired timeout in milliseconds (ms).
	 */
	public TimeoutObdCommand(int timeout) {
		super("AT ST " + Integer.toHexString(0xFF & timeout));
	}
	
	/** * @param other */
	public TimeoutObdCommand(AbstractObdCommand other) {
		super(other);
	} /*           
	 * * (non-Javadoc) * * @see
	 * eu.lighthouselabs.obd.commands.ObdCommand#getFormattedResult()
	 */

	@Override
	public String getFormattedResult() {
		return getResult();
	}

	@Override
	public String getName() {
		return "Timeout";
	}
	@Override
	public String getRequestKey() {
		// TODO Auto-generated method stub
		return null;
	}
}